//
//  Goods.m
//  fGeekApp
//
//  Created by Administrator on 15/3/7.
//  Copyright (c) 2015年 cwx. All rights reserved.
//

#import "Goods.h"

@implementation Goods

-(Goods *)initGoodsInstanceByDict:(NSDictionary *)dict{
    
    if (self = [super init]) {
        self.goodsID = [[dict valueForKey:@"goods_id"] integerValue];
        self.goodsTypeID = [[dict valueForKey:@"type_id"] integerValue];
        self.cityID = [[dict valueForKey:@"city_id"] integerValue];
        self.goodsName = [dict valueForKey:@"goods_name"];
        self.goodsPrice = [[dict valueForKey:@"goods_price"] floatValue];
        self.goodsImagePath = [dict valueForKey:@"goods_imagePath"];
        self.goodsContentBody = [dict valueForKey:@"goods_content"];
        self.goodsTime = [[dict valueForKey:@"goods_time"] integerValue];
        self.goodsAddress = [dict valueForKey:@"goods_detailAddress"];
        self.goodsSaleCount = [[dict valueForKey:@"goods_saleCount"] integerValue];
    }
    
    return self;
}

+(Goods *)getGoodsInstanceByDict:(NSDictionary *)dict{
    return [[self alloc]initGoodsInstanceByDict:dict];
}

@end
